import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage'


const urlConfig = {
  '获取经营范围列表':{ url: '/ent/regist/queryManageNature', method:'get'},// parentId
  '校验法人手机号是否注册':{ url: '/ent/regist/checkLegalRegist', method:'get'},//  legalPhone
  '有效渠道管理列表':{ url: '/qsb/channel/info/queryValChannel ', method:'post'},
  '保存企业信息':{ url: '/ent/regist/saveEntInfo ', method:'post'},
  '企业列表查询':{ url: '/ent/info/queryEntList', method:'post'},
  '企业详情查询':{ url: '/ent/info/queryEntDetail', method:'get'},
  '自动生成企业名称':{ url: '/ent/info/genEntNames ', method:'post'}, // {num: 5}
  '税务办理上传首次税务办理登记,或实名认证截图':{ url: '/tax/uploadTaxFile', method:'post'}, // {num: 5}
  '税务登记,税种确认':{ url: '/tax/updateTax', method:'post'}, // {num: 5}
  // /cloud/third/ssq/businessLicenseOCR  营业执照
  '身份证号识别':{ url: 'cloud/third/ssq/verifyOcrIDCard', method:'post'}, // {cardFrontUrl: '正面地址', cardBackUrl:'背面地址'}
  '获取续费信息':{ url: '/renew/queryRenewInfo', method:'get'}, //  服务续费-续费前查询接口
  '企业服务续费':{ url: '/renew/entRenewSub', method:'post'}, // 服务续费-续费接口
  '进行中的服务':{ url: '/qsb/order/list/processing', method:'post'}, // 服务续费-续费接口
  '企业端获取银行开户信息':{ url: '/openBank/webOpenBankDetails', method:'get'}, //
  '查询企业信息及电子签章详情':{ url: '/electionSignature/getDetail', method:'get'}, //
  '根据订单编号获取待支付金额':{ url: '/qsb/order/toBePaidAmount', method:'post'}, //
  '税务订单详情':{ url: '/taxbiz/queryTaxDetail', method:'get'}, //
  // '完善资料':{ url: '/taxbiz/bizTaxUploadFile', method:'post'}, //
  '业务办理上传资料':{ url: '/bizcommon/bizUploadFile', method:'post'}, //
  '开票列表':{ url: '/taxInvoice/list', method:'post'}, //
  '服务模式变更详情':{ url: '/svconfbiz/querySvDetail', method:'get'}, //
  'web端企业查询邮寄资料详情':{ url: '/mailingMaterial/webMailingMaterialDetails', method:'get'}, //
  '企业端发起邮寄资料申请':{ url: '/mailingMaterial/addMailingMaterial', method:'post'}, //
  '查询企业信息及个税申报详情':{ url: '/taxDeclarationEnt/getDetail', method:'get'}, //
  '个税申报上传凭证':{ url: '/taxDeclarationEnt/uploadDetail', method:'post'}, //
  '工商注册变更信息获取详情': { url: '/rechangebiz/queryDetail', method: 'get' },
  '企业注销,管理端获取详情': { url: '/ent/deregister/getWebDetails', method: 'get' },
  '查询企业信息及税务申报详情': { url: '/taxDeclarationInd/getDetail', method: 'get' },
  '税务申报客户确认': { url: '/taxDeclarationInd/updateTax', method: 'post' },
  '增值业务订单详情': { url: '/addbiz/queryDetail', method: 'get' }, //v
  'web端生成委托书': { url: '/aaum/createEntrustBook', method: 'post' }, //v
  '发送签署委托书验证码': { url: '/aaum/sendSignEntrustBookCode', method: 'post' }, //v
  '渠道签署委托书': { url: '/aaum/signEntrustBook', method: 'post' }, //v
  // 渠道预约
  '创建退票签约合同': { url: '/taxInvoiceCheck/createRefundAgree', method: 'post' }, //invcId
  '发送登陆验证码': { url: '/cloud/third/sms/sendSMSCode', method: 'get' }, //invcId
  '签署退票签约合同': { url: '/taxInvoiceCheck/signRefundAgree', method: 'post' }, //invcId

  '个税申报客户确认': { url: '/taxDeclarationEnt/updateTax', method: 'post' }, //invcId
  // 法人签署认证短信邀请链接发送
  '个税申报客户认证': { url: '/taxDeclarationEnt/sendSMS', method: 'get' }, //invcId
  '管理端点击发布，转为待确认状态': { url: '/taxDeclarationInd/uploadDetail', method: 'post' }, //invcId
  '查询企业法人信息': { url: '/legal/getLegalInfo', method: 'post' }, //entId
  '修改法人实名手机号': { url: '/legal/updateLegalPhone', method: 'post' }, //entId
  '获取企业发票号段详细余量 - 聚合接口': { url: '/billSegment/getEntMonthBillSegmentV2', method: 'get' },
  '邀请负责人线上签署': { url: '/ent/inviteEntSgin', method: 'post' },
  '查询企业合同服务模式配置': { url: '/svm/mgr/queryEntSvConf', method: 'get' }, //v
  '上传委托代征协议': { url: '/ent/mgr/saveAgreeInfo', method: 'post' }, //v
  '设置企业数电限额': { url: '/ent/mgr/setEntInvcAmount', method: 'post' }, //{entId,maxSdAmount}
  '查询企业数电发票额度': { url: '/ent/info/queryEntInvcAmount', method: 'get' }, //{entId}
  '企业注册信息查询': { url: '/ent/info/queryEntRegistInfo', method: 'get' }, //{entId}
  '根据企业id删除企业信息': { url: '/ent/del', method: 'post' }, //{entId}
  '税务办理上传首次税务办理登记': { url: '/tax/uploadTaxFile', method: 'post' }, //{entId}
  '企业端电子税务局密码提交': { url: '/tax/dzTaxPassSubmit', method: 'post' }, //{entId}
  '修改法人实名采集已完成': { url: '/tax/realNameGather', method: 'get' }, //{entId}
  '入驻成功展示标记': { url: '/ent/settleDoneDis', method: 'get' }, //{entId}
  '获取一级经营范围列表': { url: '/ent/regist/queryParentManageNature', method: 'get' }, // {meritoFlag}
  '获取二级经营范围列表': { url: '/ent/regist/querySecondManageNature', method: 'get' }, // {parentId,meritoFlag}
  '经营范围详情': { url: '/ent/regist/queryManageNatureDetail', method: 'get' }, // {secondId,meritoFlag}
  '获取经营范围数列表': { url: '/ent/regist/queryManageNatureTree', method: 'get' }, // {parentId,meritoFlag}
  // https://webapidev-k8s.zxjztech.com/information/bankInfoList?_t=1725498977&name=%E4%B8%AD
  '查询开户行信息': { url: '/information/bankInfoList', method: 'get' }, //{entId}
  '企业银行卡三要素验证': { url: '/ent/info/entBankCheck', method: 'post' }, //{entId}
}

const actionType = {
  get: (url,parameter)=>{
    return getAction(url,parameter)
  },
  post:(url,parameter)=>{
    return postAction(url,parameter)
  },
  put:(url,parameter)=>{
    return putAction(url,parameter)
  },
  delete:(...args)=>{
    return deleteAction(...args)
  },
  http:(url,parameter,method)=>{
    return httpAction(url,parameter,method)
  },
}

export default (key,...args) =>{
  const tempConfig = urlConfig[key]
  return actionType[tempConfig.method](tempConfig.url,...args)
}

